package com.mttk.api.addon.ai.pool;

import com.mttk.api.addon.ai.pool.model.AiModel;
import com.mttk.api.addon.ai.pool.model.AiModelCommon;
import com.mttk.api.addon.ai.pool.model.AiModelDeepseek;
import com.mttk.api.addon.ai.pool.model.AiModelSilicon;
import com.mttk.api.addon.impl.pool.CustomizePooledObjectFactory;

public class AiPoolFactory extends CustomizePooledObjectFactory<AiModel> {
	@Override
	public AiModel create() throws Exception {
		String provider=config.getString("provider");
		if("ds".equals(provider) ) {
			return new AiModelDeepseek(config);
		}else if("silicon".equals(provider)) {
			return new AiModelSilicon(config);
		}else if("common".equals(provider)) {
			return new AiModelCommon(config);	
		}else {
			throw new RuntimeException("No provider is found for "+provider);
		}
		
		
	}
}
